home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 31
/
Aminet 31 (1999)(Schatztruhe)[!][Jun 1999].iso
/
Aminet
/
comm
/
tcp
/
queso.lha
/
queso.amirx
< prev
next >
Wrap
Text File
|
1999-03-29
|
1KB
|
70 lines
/* queso,amirx 1.0 (29.3.1999) by alfie
Based on queso.amirx/0.1 by poing
Usage: /rx queso [nickname] [port/N]
Otherwise:
/alias queso /rx queso %p
and then just
/queso nickname
If no nickname given, it gets the selected user, if any
Can be call in the form
/rx queso.amirx port/N
to specified a port an get the selected user, if any
*/
/*** SET THIS PATH TO A COMPLETE PATH TO queso !!! */
cmdPath="inet:bin/queso"
signal on syntax
options results
prgName="queso"
parse arg user port .
"ISCONNECTED"
if rc~=0 then call ircErr "Not connected."
if user="" | DataType(user,"N") then do
"GETCHANNEL"
ch=result
"GETSELECTEDUSER CHANNEL" ch
if rc~=0 then call ircErr "No user selected."
if port="" then port=user
user=result
end
if port="" then port=113
if port<1 | port>65535 then call ircErr "bad value port '"port"'."
"USERHOST" user
if rc~=0 then call ircErr "User '"user"' not found."
parse var result d"@"host
call ircInfo "Checking '"user"' ["host":"port"]..."
file="pipe:queso."pragma("ID")
cmd="run" cmdPath ">"file host':'port
address command cmd
if rc~=0 then call ircErr "queso failed."
if ~Open(fp,file,"R") then call ircErr "can't open pipe:"
do while ~eof(fp)
line = ReadLN(fp)
if line~="" then call ircInfo line
end
exit
ircInfo:
parse arg msg
"echo P="d2c(27)"b«"prgName"» C=6" msg
return
ircErr:
parse arg msg
call ircInfo msg
exit
syntax:
call ircErr "Syntax error:"ErrorText(rc) "in line:"sigl